<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>资讯详情</title>
    <link rel="stylesheet" type="text/css" href="./css/api.css" />
    <link rel="stylesheet" type="text/css" href="./css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="./css/style.css" />
    <script type="text/javascript" src="./script/api.js"></script>
    <script type="text/javascript" src="./script/aui-tab.js"></script>
    <link rel="stylesheet" type="text/css" href="./css/aui-slide.css" />
    <script type="text/javascript" src="./script/aui-slide.js"></script>
    <script type="text/javascript" src="./script/base.js"></script>
    <script type="text/javascript" src="./script/jquery-3.2.0.js"></script>
    <script type="text/javascript">
        function closeWin() {
            api.closeWin({});
        };
    </script>
</head>
<style>
    html,
    body {
        height: 100%;
        background: rgba(0, 0, 0, 0);
    }
</style>

<body>
    <header class="aui-bar aui-bar-nav pos" id='topbar'>
        <!-- <a class="aui-pull-left aui-btn" onclick="closeWin()"> -->
        <!-- <span class="aui-iconfont aui-icon-left"></span> -->
        </a>
        <div class="aui-title" id="title_head">请验证</div>
    </header>

</body>

<script type="text/javascript">
    apiready = function() {


        lock();

    };

    function lock() {

        var password = $api.getStorage('password');


        var patternLock = api.require('patternLock');
        patternLock.addPatternLock({
            viewName: 'main',
            rightColor: '#ffffff',
            drawColor: '#ffffff',
            wrongColor: '#ffffff',
            normalColor: '#ffffff',
            frame: "{{0,150},{" + api.winWidth + "," + api.winHeight + "}}",
            mode: '0',
            rightCode: password
        }, function(ret, err) {
            if (ret) {
                if (ret.status == "0") {
                    api.toast({
                        msg: '解锁成功！',
                        duration: 2000,
                        location: 'middle'
                    });
                    api.closeWin();

                } else if (ret.status == "1") {


                    var jsfun = 'reload();';
                    api.execScript({
                        name: 'home',
                        script: jsfun
                    });

                }

            } else {
                alert(JSON.stringify(err));
            }
        });

    }
</script>

</html>
